﻿using System.Text;
using UnityEngine;
public class MeshUtillity : MonoBehaviour
{
    void Start()
    {
        Mesh mesh=this.GetComponent<MeshFilter>().mesh;
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 8; i++)
        {
            for (int j = 0; j < 10; j++)
            {
                if (mesh.vertices[i * 10 + j].z > 0)
                {
                    sb.Append(string.Format("{0}{1}{2}"," ", mesh.vertices[i * 10 + j].z.ToString("F3"), ","));
                    continue;
                }
                sb.Append(string.Format("{0}{1}", mesh.vertices[i * 10 + j].z.ToString("F3"), ","));
            }
            sb.Append("\n");
        }
        Debug.Log(sb.ToString());
    }
}
